<?php

/* 品牌 brand */
class Disreason_typeModel extends BaseModel
{
    var $table  = 'disreason_type';
    var $prikey = 'did';
    var $_name  = 'disreason_type';
	
    var $_relation = array(
	);

	    /*
     * 判断名称是否唯一
     */
    function unique($type_name,$did = 0)
    {
        $conditions ="type_name = '" . $type_name . "' AND did != ".$did."";
		
        return count($this->find(array('conditions' => $conditions))) == 0;
    }
}

?>